function weight=calc_weight(HH_t,BI_t)


weight=(HH_t); % this is a bit safer, doesn't put extra weight on ones closer to 0